<?php

class MM_Exception_Public extends Exception {
	
	private $links;
	private $header;
	
	/**
	 * Public exceptions, $links in form:
	 * array(
	 *		array('Anchor', array('controller' => 'somecontroller', 'action' => 'someaction')),
	 *		array('Anchor 2', array('controller' => 'othercontroller')),
	 * )
	 *
	 * @param string $message
	 * @param array $links
	 * @param string $header
	 */
	public function __construct($message, $links = array(), $header = null) {
		parent::__construct($message);
		$this->links = $links;
		$this->header = $header;
	}
	
	public function getLinks() {
		return empty($this->links)?null:$this->links;
	}
	
	public function getHeader() {
		return $this->header;
	}
	
}